<template>
    <section>
      <button @click="handleLogin">一键登录</button>
      <button @click="handleLogout">一键登出</button>
    </section>
  </template>
  
  <script>
  export default {
    methods: {
        handleLogin() {
            sessionStorage.setItem("isLogin",true);
            const path = sessionStorage.getItem("path");
            if (path) {
                console.log("path = ",path);
                this.$router.replace(path);
            }
        },
        handleLogout() {
            sessionStorage.removeItem("isLogin");
        }
    }
  }
  </script>
  
  <style scoped>
  
  </style>